package org.hadoop.sort;
import org.apache.hadoop.io.WritableComparable;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
public class MyText implements WritableComparable<MyText> {
    private String text;
    @Override
    public int compareTo(MyText o) {
        return o.text.compareTo(this.text);
    }
    @Override
    public void write(DataOutput out) throws IOException {
        out.writeUTF(text);
    }
    @Override
    public void readFields(DataInput in) throws IOException {
        text = in.readUTF();
    }
    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }
}